package com.zym.init.core.task;

import com.zym.init.core.utils.RedisUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 心跳任务
 */
@Component
public class HeartbeatTask {

    /**
     * redis心跳任务，每60秒执行一次
     */
    @Scheduled(cron = "0/60 * * * * *")
    public void timer() {
        RedisUtils.get("redis-heartbeat");
    }
}